package readtreefromfile;

import java.util.ArrayList;
import java.util.List;

public class Category {
	private int level;
	private String catName;
	private Category parent;
	private List<Category> children=new ArrayList<Category>();
	
	public Category(int level,String name){
		this.level=level;
		this.catName=name;
	}
	
	public void addChildren(Category child){
		child.setParent(this);
		this.children.add(child);
	}
	
	public String getCatName() {
		return catName;
	}
	public void setCatName(String catName) {
		this.catName = catName;
	}
	public Category getParent() {
		return parent;
	}
	public void setParent(Category parent) {
		this.parent = parent;
	}
	public List<Category> getChildren() {
		return children;
	}
	public void setChildren(List<Category> children) {
		this.children = children;
	}

	public int getLevel() {
		return level;
	}
}
